Fix bug in page layout
authorjustbur <justin@burkett.cc>
Mon, 20 Jul 2015 18:05:42 +0000 (14:05 -0400)
committerjustbur <justin@burkett.cc>
Mon, 20 Jul 2015 18:05:42 +0000 (14:05 -0400)
Pages were getting dropped

which-key.el

index cb855e98c23b5b5addd0f43df73d01789c0876fc..972069a36b6d5b4ce659f30ab49b77cbc7fcc21e 100644 (file)
@@ -852,7 +852,9 @@ element in each list element of KEYS."
           (push (which-key--join-columns page-cols) pages)
           (push (* (length page-cols) avl-lines) keys/page)
           (push page-width page-widths)
-          (setq n-pages (1+ n-pages) page-cols '() page-width 0))))
+          (setq n-pages (1+ n-pages)
+                page-cols (list (cdr col))
+                page-width (car col)))))
     (when (> (length page-cols) 0)
       (push (which-key--join-columns page-cols) pages)
       (push (* (length page-cols) avl-lines) keys/page)
@@ -877,6 +879,7 @@ element in each list element of KEYS."
                         (member which-key-side-window-location '(left right))))
          (result (which-key--partition-columns keys avl-lines avl-width))
          pages keys/page n-pages found prev-result)
+    (setq int result)
     (cond ((or vertical (> (plist-get result :n-pages) 1) (= 1 avl-lines))
            result)
           ;; do a simple search for the smallest number of lines